﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using CallBox.Entity;
using CallBox.Dao;

namespace CallBox.BL
{
    public class clsMobileBL
    {
        private static clsMobileBL objIntancia;
		private static Mutex objMutex = new Mutex();
		public static clsMobileBL Intancia
		{
			get
			{
				objMutex.WaitOne();
				if (objIntancia==null)
				{
					objIntancia = new clsMobileBL();
				}
				objMutex.ReleaseMutex();
				return objIntancia;
			}
		}
        public clsMobileBL()
		{
		}
        public clsMobile Validate(String Number, String Password)
        {
            return clsMobileDAO.Intancia.Validate(Number, Password);
        }

        public clsMobile GetAuthCode(String Number)
        {
            return clsMobileDAO.Intancia.GetAuthCode(Number);
        }

        public String ValidateFirstAccess(String Number, String AuthCode)
        {
            return clsMobileDAO.Intancia.ValidateFirstAccess(Number, AuthCode);
        }

    }
}
